﻿@model IEnumerable<GioHangViet.Models.Comter>

@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Admin/Views/Shared/_AdministratorLayout.cshtml";
}

<div class="row-fluid">
    <div class="span12">
        <div class="widget-block">
            <div class="widget-head">
                <h5>
                    Danh mục Dịch giả</h5>
                <div class="widget-control pull-right">
                    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-cog"></i>
                        <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="@Url.Action("Create", "Comter", new { Area = "Admin" })"><i class="icon-plus">
                                                                                                </i>Thêm mới</a></li>
                        <li><a href="#"><i class="icon-ok"></i>Thống kê</a></li>
                    </ul>
                </div>
            </div>
            <div class="widget-content">
                <div class="widget-box">
                    <div role="grid" class="dataTables_wrapper" id="DataTables_Table_2_wrapper">
                        <div class="tbl-tools-searchbox">
                            <div class="dataTables_filter" id="DataTables_Table_2_filter">
                                <label>
                                    Search:
                                    <input type="text" aria-controls="DataTables_Table_2"></label></div>
                            <div id="DataTables_Table_2_length" class="dataTables_length">
                                <label>
                                    <span class="lenghtMenu">
                                        <select name="DataTables_Table_2_length" size="1" aria-controls="DataTables_Table_2"
                                                class="tbl_length">
                                            <option value="10" selected="selected">10</option>
                                            <option value="25">25</option>
                                            <option value="50">50</option>
                                            <option value="100">100</option>
                                        </select></span><span class="lengthLabel">Entries per page:</span></label></div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="tbl_tools">
                            <div class="ColVis TableTools">
                                <button class="ColVis_Button TableTools_Button ColVis_MasterButton">
                                    <span>Show / hide columns</span></button></div>
                            <div class="DTTT_container">
                                <button class="DTTT_button DTTT_button_copy" id="ToolTables_DataTables_Table_2_0">
                                    <span>Copy</span></button>
                                <button class="DTTT_button DTTT_button_csv" id="ToolTables_DataTables_Table_2_1">
                                    <span>CSV</span></button>
                                <button class="DTTT_button DTTT_button_xls" id="ToolTables_DataTables_Table_2_2">
                                    <span>Excel</span></button>
                                <button class="DTTT_button DTTT_button_pdf" id="ToolTables_DataTables_Table_2_3">
                                    <span>PDF</span></button>
                                <button class="DTTT_button DTTT_button_print" id="ToolTables_DataTables_Table_2_4"
                                        title="View print view">
                                    <span>Print</span></button>
                                <div style="position: absolute; left: 0px; top: 0px; width: 67px; height: 30px; z-index: 99;">
                                    <embed width="67" height="30" align="middle" wmode="transparent" flashvars="id=1&amp;width=67&amp;height=30"
                                           pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                                           allowfullscreen="false" allowscriptaccess="always" name="ZeroClipboardMovie_1"
                                           bgcolor="#ffffff" quality="best" menu="false" loop="false" src="swf/copy_cvs_xls_pdf.swf"
                                           id="ZeroClipboardMovie_1">
                                </div>
                                <div style="position: absolute; left: 72px; top: 0px; width: 64px; height: 30px;
                                                                                                                                                                z-index: 99;">
                                    <embed width="64" height="30" align="middle" wmode="transparent" flashvars="id=2&amp;width=64&amp;height=30"
                                           pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                                           allowfullscreen="false" allowscriptaccess="always" name="ZeroClipboardMovie_2"
                                           bgcolor="#ffffff" quality="best" menu="false" loop="false" src="swf/copy_cvs_xls_pdf.swf"
                                           id="ZeroClipboardMovie_2">
                                </div>
                                <div style="position: absolute; left: 141px; top: 0px; width: 68px; height: 30px;
                                                                                                                                                                                                                     z-index: 99;">
                                    <embed width="68" height="30" align="middle" wmode="transparent" flashvars="id=3&amp;width=68&amp;height=30"
                                           pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                                           allowfullscreen="false" allowscriptaccess="always" name="ZeroClipboardMovie_3"
                                           bgcolor="#ffffff" quality="best" menu="false" loop="false" src="swf/copy_cvs_xls_pdf.swf"
                                           id="ZeroClipboardMovie_3">
                                </div>
                                <div style="position: absolute; left: 214px; top: 0px; width: 61px; height: 30px;
                                                                                                                                                                                                                                                                          z-index: 99;">
                                    <embed width="61" height="30" align="middle" wmode="transparent" flashvars="id=4&amp;width=61&amp;height=30"
                                           pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                                           allowfullscreen="false" allowscriptaccess="always" name="ZeroClipboardMovie_4"
                                           bgcolor="#ffffff" quality="best" menu="false" loop="false" src="swf/copy_cvs_xls_pdf.swf"
                                           id="ZeroClipboardMovie_4">
                                </div>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="table_content">
                            <table class="data-tbl-tools table dataTable" id="DataTables_Table_2">
                                <thead>
                                    <tr role="row">
                                        <th class="sorting_asc" style="width: 154px;">
                                            Tên dịch giả
                                        </th>
                                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_2"
                                            rowspan="1" colspan="1" style="width: 118px;">
                                            Acction
                                        </th>
                                    </tr>
                                </thead>
                                <tbody role="alert" aria-live="polite" aria-relevant="all">
                                    @{
                                        var i = 0;
                                        var CSSClass = "";
                                    }
                                    @foreach (var item in Model)
                                    {
                                        if (i % 2 == 0)
                                        {
                                            CSSClass = "odd";
                                        }
                                        else
                                        {
                                            CSSClass = "even";
                                        }
                                        i++;
                                        <tr class="@CSSClass">
                                            <td>
                                                @Html.DisplayFor(modelItem => item.Name)
                                            </td>
                                            <td>
                                                @Html.ActionLink("Edit", "Edit", new { id = item.Alias }) |
                                                @Html.ActionLink("Delete", "Delete",new { id = item.Alias }, new { onclick = "return confirm('Bạn chắc chắn xóa danh mục này không?');" }) 
                                            </td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                        @Html.Partial("_Pagging")
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

